from __future__ import absolute_import, unicode_literals
from celery import shared_task

from utils.my_mail import my_send_mail


@shared_task
def queue_send_mail(title, content, to_mail):
    res = my_send_mail(title, content, to_mail)
    if bool(res):
        return "发送用户注册邮件成功,接受者{}".format(to_mail)
    else:
        return "发送用户注册邮件失败,接受者{}".format(to_mail)
